/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Principal.java
 *
 * Created on 06-mar-2012, 11:59:01
 */


import java.sql.SQLException;

/**
 *
 * @author Alberto
 */
public class Principal extends javax.swing.JFrame {

    /** Creates new form Principal */
    public Principal() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jButtonClientes = new javax.swing.JButton();
        jButtonProveedores = new javax.swing.JButton();
        jButtonRecambios = new javax.swing.JButton();
        jButtonInformes = new javax.swing.JButton();
        jButtonFacturas = new javax.swing.JButton();
        jButtonPedidos = new javax.swing.JButton();
        jButtonSalir = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance().getContext().getResourceMap(Principal.class);
        setTitle(resourceMap.getString("FormPrincipal.title")); // NOI18N
        setName("FormPrincipal"); // NOI18N

        jButtonClientes.setText(resourceMap.getString("jButtonClientes.text")); // NOI18N
        jButtonClientes.setName("jButtonClientes"); // NOI18N
        jButtonClientes.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButtonClientesMouseClicked(evt);
            }
        });

        jButtonProveedores.setText(resourceMap.getString("jButtonProveedores.text")); // NOI18N
        jButtonProveedores.setName("jButtonProveedores"); // NOI18N

        jButtonRecambios.setText(resourceMap.getString("jButtonRecambios.text")); // NOI18N
        jButtonRecambios.setName("jButtonRecambios"); // NOI18N

        jButtonInformes.setText(resourceMap.getString("jButtonInformes.text")); // NOI18N
        jButtonInformes.setName("jButtonInformes"); // NOI18N

        jButtonFacturas.setText(resourceMap.getString("jButtonFacturas.text")); // NOI18N
        jButtonFacturas.setName("jButtonFacturas"); // NOI18N

        jButtonPedidos.setText(resourceMap.getString("jButtonPedidos.text")); // NOI18N
        jButtonPedidos.setName("jButtonPedidos"); // NOI18N

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance().getContext().getActionMap(Principal.class, this);
        jButtonSalir.setAction(actionMap.get("quit")); // NOI18N
        jButtonSalir.setText(resourceMap.getString("jButtonSalir.text")); // NOI18N
        jButtonSalir.setName("jButtonSalir"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(107, 107, 107)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButtonClientes)
                    .addComponent(jButtonInformes))
                .addGap(135, 135, 135)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButtonProveedores)
                    .addComponent(jButtonFacturas))
                .addGap(116, 116, 116)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButtonSalir)
                    .addComponent(jButtonPedidos)
                    .addComponent(jButtonRecambios))
                .addContainerGap(415, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(142, 142, 142)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonClientes)
                    .addComponent(jButtonProveedores)
                    .addComponent(jButtonRecambios))
                .addGap(61, 61, 61)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonInformes)
                    .addComponent(jButtonFacturas)
                    .addComponent(jButtonPedidos))
                .addGap(177, 177, 177)
                .addComponent(jButtonSalir)
                .addContainerGap(271, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonClientesMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButtonClientesMouseClicked
        // TODO add your handling code here:                    
        Clientes formClientes = new Clientes();
        formClientes.setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_jButtonClientesMouseClicked

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new Principal().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButtonClientes;
    private javax.swing.JButton jButtonFacturas;
    private javax.swing.JButton jButtonInformes;
    private javax.swing.JButton jButtonPedidos;
    private javax.swing.JButton jButtonProveedores;
    private javax.swing.JButton jButtonRecambios;
    private javax.swing.JButton jButtonSalir;
    // End of variables declaration//GEN-END:variables
}
